<?php

use yii\helpers\Url;
use yii\helpers\Html;
use common\helpers\Render;

?>

<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>

    <meta charset="<?= Yii::$app->charset ?>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <?= Html::csrfMetaTags() ?>
    <title><?= $this->context->module->name.' '.Html::encode($this->title) ?></title>
    <?php // $this->head() ?>
    <link rel="stylesheet" href="<?= Url::to('@web/web/static/Font-Awesome-3.2.1/css/font-awesome.css') ?>">
    <link rel="stylesheet" href="<?= Url::to('@web/web/static/css/site.css') ?>">
    <link rel="stylesheet" href="<?= Render::static('flyer/flyer.css') ?>">
    <script src="<?= Render::static('jquery/jquery-2.0.3.min.js') ?>"></script>
    <script src="<?= Render::static('layer/layer.js') ?>"></script>
    <link rel="stylesheet" href="<?= Render::static('pikaday/pikaday.css') ?>">
    <link rel="stylesheet" href="<?= Render::static('flyer/flyer.css') ?>">
    <script src="<?= Render::static('pikaday/pikaday.min.js') ?>"></script>
    <script src="<?= Url::to('@web/web/static/js/common.js') ?>"></script>
    <script>
        $(document).ready(function() {
            $('#navigator .taber').bind('hover', function() {
                var target = $(this).attr('data-target');
                $('#navigator .conter').hide();
                if(target) {
                    $(target).show();
                }
            });
        });
    </script>
</head>

<body>
<?php $this->beginBody() ?>

<!-- header start -->
<header class="shadow" id="pg-header">
    <div id="toper">
        <div class="contenter">
            <?php if(Yii::$app->isLogin()) { ?>
                <a class="cl-red mr-20px" href="<?= Url::to('@web/'.(Yii::$app->getUser()->controller()).'/index') ?>">欢迎您：<?= empty(Yii::$app->user->nickname)?Yii::$app->user->username:Yii::$app->user->nickname ?></a>
                <a class="ml-20px" href="<?= Url::to('@web/user/logout') ?>">退出</a>
            <?php } else { ?>
                <a class="cl-red mr-20px" href="<?= Url::to('@web/user/login') ?>">亲，请登录</a>
                <a class="ml-20px" href="<?= Url::to('@web/user/register') ?>">注册</a>
            <?php } ?>
        </div>
    </div>
    <div class="contenter" id="siter">
        <div id="searcher">
            <input type="text" name="search" placeholder="设计师、作品">
            <span><i class="icon-search"></i></span>
        </div>
        <a href="<?= Url::to('@web/welcome') ?>"><div class="loger" id="loger"></div></a>
        <div id="navigator">
            <span class="naver"><a class="transition" href="<?= Url::to('@web/welcome') ?>">首页</a></span>
            <span class="naver"><a class="transition" href="<?= Url::to('@web/search/designer') ?>">设计师</a></span>
            <span class="naver"><a class="transition" href="<?= Url::to('@web/information/customer') ?>">客服</a></span>
            <span class="naver"><a class="transition" href="<?= Url::to('@web/information/employment-reader') ?>">雇佣必读</a></span>
            <span class="naver"><a class="transition" href="<?= Url::to('@web/information/rule') ?>">服务准则</a></span>
            <span class="naver"><a class="transition" href="<?= Url::to('@web/information/about') ?>">关于我们</a></span>
        </div>
        <div class="clear"></div>
    </div>
</header>

<div id="pg-contenter">
    <?= $content ?>
</div>

<!-- footer start -->
<footer id="pg-footer">
    <div id="sitemap">
        <div class="contenter clear">
            <div class="sitemap">
                <p class="h3">平台指南</p>
                <p><a href="<?= Url::to('@web/user/register') ?>">免费注册</a></p>
                <p><a href="<?= Url::to('@web/information/employment-guide') ?>">雇佣指南</a></p>
                <p><a href="<?= Url::to('@web/information/employment-type') ?>">雇佣模式</a></p>

            </div>
            <div class="sitemap">
                <p class="h3">规则保障</p>
                <p><a href="<?= Url::to('@web/information/free-trial') ?>">3天免费试用</a></p>
                <p><a href="<?= Url::to('@web/information/payroll') ?>">薪资发放</a></p>
                <p><a href="<?= Url::to('@web/information/fire-complaint') ?>">解雇投诉</a></p>
                <p><a href="<?= Url::to('@web/information/coupon-use') ?>">请假暂停</a></p>
            </div>
            <div class="sitemap">
                <p class="h3">平台规则</p>
                <p><a href="<?= Url::to('@web/information/work-standard') ?>">设计师规则</a></p>
                <p><a href="<?= Url::to('@web/information/designer-standard') ?>">红包使用规则</a></p>
<!--                <p><a href="--><?//= Url::to('@web/information/salary-standard') ?><!--">薪资标准</a></p>-->
                <p><a href="<?= Url::to('@web/information/complete-standard') ?>">售后判定规则</a></p>
            </div>
            <div class="sitemap">
                <p class="h3">关于服务</p>
                <p><a href="<?= Url::to('@web/information/member') ?>">会员中心</a></p>
                <p><a href="<?= Url::to('@web/information/rule') ?>">平台规则</a></p>
            </div>
            <div class="contact">
                <p class="h3">联系我们</p>
                <p><a href="qq:2971331067">服务 QQ：  2971331067</a></p>
                <p>客服电话：13208042176</p>
                <p>工作时间：周一到周五 9：00 ~ 18：00</p>
            </div>
        </div>
    </div>
    <div id="footer-text">
        <div class="contenter">
<!--            <p>-->
<!--                <span>热门推荐：</span>-->
<!--                <a href="--><?//= Url::to('@web/information/about') ?><!--">关于平台</a> |-->
<!--                <a href="--><?//= Url::to('@web/information/contact') ?><!--">联系我们</a> |-->
<!--                <a href="--><?//= Url::to('@web/information/join') ?><!--">加入我们</a> |-->
<!--                <a href="--><?//= Url::to('@web/information/team') ?><!--">团队介绍</a> |-->
<!--                <a href="--><?//= Url::to('@web/information/law') ?><!--">法律说明</a> |-->
<!--                <a href="--><?//= Url::to('@web/information/qualifications') ?><!--">公司资质</a> |-->
<!--                <a href="--><?//= Url::to('@web/information/cooperator') ?><!--">商务合作</a>-->
<!--            </p>-->
            <p>
                <span class="mr-20px">版权所有：杭州陆离网络科技有限公司</span>
                <span class="mr-20px">平台保障：杭州陆离网络科技有限公司</span>
                <span>备案号：浙ICP备18005258号</span>
            </p>
        </div>
    </div>
</footer>

<script>
  // 页面加载完毕之后的弹窗信息
  $(document).ready(function() {
    var isAlert = '<?= Yii::$app->controller->isAlert ?>';
    var code = '<?= Yii::$app->controller->status['code'] ?>';
    if (isAlert == 'true' || isAlert == '1') {
      if (code == 200) {
        layer.msg('<?= Yii::$app->controller->status['message'] ?>');
      }
      else {
        layer.msg('<?= Yii::$app->controller->status['message'] ?>');
      }
    }
  });
</script>

<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
